import 'package:json_annotation/json_annotation.dart';

part 'coupon_entity.g.dart';

@JsonSerializable()
class CouponEntity {
  int? total;
  int? pages;
  int? limit;
  int? page;
  List<CouponList>? xList;

  CouponEntity({
    this.total,
    this.pages,
    this.limit,
    this.page,
    this.xList,
  });

  factory CouponEntity.fromJson(Map<String, dynamic> json) => _$CouponEntityFromJson(json);

  Map<String, dynamic> toJson() => _$CouponEntityToJson(this);
}

@JsonSerializable()
class CouponList {
  String? min;
  String? name;
  String? discount;
  String? startTime;
  int? id;
  String? tag;
  String? endTime;
  String? desc;

  CouponList({
    this.min,
    this.name,
    this.discount,
    this.startTime,
    this.id,
    this.tag,
    this.endTime,
    this.desc,
  });

  factory CouponList.fromJson(Map<String, dynamic> json) => _$CouponListFromJson(json);

  Map<String, dynamic> toJson() => _$CouponListToJson(this);
}